package constants;

import utils.Utils;

/**
 * @author yangzhi
 * @date 2019/8/2
 */
public class BuDefault {
	/**
	 *
	 道闸类型，0单闸，1双闸
	 */
	public static final class gateType{
		public static final Integer zero = 0;
		public static final Integer one = 1;
	}

	/**
	 *
	 0即将开业，1正常营业，2站点维护
	 */
	public static final class openStatus{
		public static final Integer zero = 0;
		public static final Integer one = 1;
		public static final Integer two =2;

	}

	public static final class openStatusName{
		public static final String zero = "即将开业";
		public static final String one = "正常营业";
		public static final String two ="站点维护";
	}

	/**
	 * 0未服务，1服务中，2服务结束
	 */
	public static final class serviceStatus{
		public static final Integer zero = 0;
		public static final Integer one = 1;
		public static final Integer two =2;

	}

	public static final class serviceStatusName{
		public static final String zero = "未服务";
		public static final String one = "服务中";
		public static final String two ="服务结束";
	}



	public static final class nameType{
		public static final String serviceStatus="serviceStatus";
		public static final String openStatus ="openStatus";
		public static final String actionType ="actionType";
		public static final String couponType ="couponType";
		public static final String couponUse ="couponUse";
		public static final String dispatchType ="dispatchType";
		public static final String couponStatus ="couponStatus";
		public static final String getWay ="getWay";
		public static final String status ="status";
		public static final String deviceType ="deviceType";
		public static final String accountType ="accountType";

	}

	/**
	 * 操作类型：1充值，2微信支付洗车，3余额支付洗车，4微信退款， 5余额退款
	 */
	public static final class actionType {
		public static final Integer one = 1;
		public static final Integer two = 2;
		public static final Integer three = 3;
		public static final Integer four = 4;
		public static final Integer five = 5;
	}

	public static final class actionTypeName{
		public static final String one = "充值";
		public static final String two = "微信支付洗车";
		public static final String three = "余额支付洗车";
		public static final String four = "微信退款";
		public static final String five = "余额退款";
	}

	/**
	 * 账单&余额明细列表的名称
	 */
	public static final class name {
		public static final String one = "会员充值￥";
		public static final String two = " 精洗服务";
	}

	/**
	 * 优惠券类型，0免费券，1现金券
	 */
	public static final class couponType{
		public static final Integer zero = 0;
		public static final Integer one = 1;
	}
	public static final class couponTypeName{
		public static final String zero = "免费券";
		public static final String one = "现金券";
	}

	/**
	 * 优惠券场景，0自用，1赠送
	 */
	public static final class couponUse{
		public static final Integer zero = 0;
		public static final Integer one = 1;
	}
	public static final class couponUseName{
		public static final String zero = "自用";
		public static final String one = "赠送";
	}


	/**
	 * 派发方式，0公开链接，1隐藏链接
	 */
	public static final class dispatchType{
		public static final Integer zero = 0;
		public static final Integer one = 1;
	}

	public static final class dispatchTypeName{
		public static final String zero = "公开链接";
		public static final String one = "隐藏链接";
	}

	/**
	 * '状态：0未被领取(也可能过期，兑换时检查),1已被领取,2已失效(过期)',3已赠送
	 */
	public static final class couponStatus{
		public static final Integer zero = 0;
		public static final Integer one = 1;
		public static final Integer two = 2;
		public static final Integer three = 3;
	}
	public static final class couponStatusName{
		public static final String zero = "未被领取";
		public static final String one = "已被领取";
		public static final String two = "已失效";
		public static final String three = "已赠送";
	}


	/**
	 * 0未开始，1进行中，2已失效，3已结束
	 */
	public static final class status{
		public static final Integer zero = 0;
		public static final Integer one = 1;
		public static final Integer two = 2;
		public static final Integer three = 3;
	}
	public static final class statusName{
		public static final String zero = "未开始";
		public static final String one = "进行中";
		public static final String two = "已失效";
		public static final String three = "已结束";
	}


	/**
	 * 获取券的方式，1充值赠送 2系统派发 3他人赠送 4优惠码领取 5用户通过公链领取 
	 */
	public static final class getWay{
		public static final Integer one = 1;
		public static final Integer two = 2;
		public static final Integer three = 3;
		public static final Integer four = 4;
		public static final Integer five = 5;
	}
	public static final class getWayName{
		public static final String one = "充值赠送";
		public static final String two = "系统派发";
		public static final String three = "他人赠送";
		public static final String four = "优惠码领取";
		public static final String five = "用户通过公链领取";
	}

	/**
	 *  设备类型，0洗车设备，1入闸，2出闸，3出入同用闸
	 */
	public static final class deviceType{
		public static final Integer zero = 0;
		public static final Integer one = 1;
		public static final Integer two = 2;
		public static final Integer three = 3;
	}
	public static final class deviceName{
		public static final String zero = "洗车设备";
		public static final String one = "入闸设备";
		public static final String two = "出闸设备";
		public static final String three = "出入同用闸设备";
	}

	/**
	 * 0管理后台账号，1商家主账号， 2商家子账号
	 */
	public static final class accountType {
		public static final Integer zero = 0;
		public static final Integer one = 1;
		public static final Integer two = 2;
	}

	public static final class accountTypeName {
		public static final String zero = "管理后台账号";
		public static final String one = "商家主账号";
		public static final String two = "商家子账号";
	}

	/**
	 * 获取中文对应的描述
	 * @param value
	 * @param name
	 * @return
	 */
	public static String getResultName(Integer value,String name){
		String result ="";
		if (!Utils.isNullOrEmpty(name)){
			if(name.equals(nameType.openStatus)){
				if(value.equals(openStatus.zero)){
					result =openStatusName.zero;
				}else if (value.equals(openStatus.one)){
					result =openStatusName.one;
				}else if (value.equals(openStatus.two)){
					result =openStatusName.two;
				}
			}else if(name.equals(nameType.serviceStatus)){
				if(value.equals(serviceStatus.zero)){
					result =serviceStatusName.zero;
				}else if (value.equals(serviceStatus.one)){
					result =serviceStatusName.one;
				}else if (value.equals(serviceStatus.two)){
					result =serviceStatusName.two;
				}
			}else if(name.equals(nameType.actionType)){
				if(value.equals(actionType.one)){
					result =actionTypeName.one;
				}else if (value.equals(actionType.two)){
					result =actionTypeName.two;
				}else if (value.equals(actionType.three)){
					result =actionTypeName.three;
				} else if (value.equals(actionType.four)){
					result =actionTypeName.four;
				}else if (value.equals(actionType.five)){
					result =actionTypeName.five;
				}
			}else if (name.equals(nameType.couponType)){
				if(value.equals(couponType.zero)){
					result =couponTypeName.zero;
				}else if (value.equals(couponType.one)){
					result =couponTypeName.one;
				}
			}else if (name.equals(nameType.couponUse)){
				if(value.equals(couponUse.zero)){
					result =couponUseName.zero;
				}else if (value.equals(couponUse.one)){
					result =couponUseName.one;
				}
			}else if (name.equals(nameType.dispatchType)){
				if(value.equals(dispatchType.zero)){
					result =dispatchTypeName.zero;
				}else if (value.equals(dispatchType.one)){
					result =dispatchTypeName.one;
				}
			}else if (name.equals(nameType.couponStatus)){
				if(value.equals(couponStatus.zero)){
					result =couponStatusName.zero;
				}else if (value.equals(couponStatus.one)){
					result =couponStatusName.one;
				}else if (value.equals(couponStatus.two)){
					result =couponStatusName.two;
				}else if (value.equals(couponStatus.three)){
					result =couponStatusName.three;
				}
			}else if (name.equals(nameType.getWay)){
				if (value.equals(getWay.one)){
					result =getWayName.one;
				}else if(value.equals(getWay.two)){
					result =getWayName.two;
				}else if (value.equals(getWay.three)){
					result =getWayName.three;
				}else if (value.equals(getWay.four)){
					result =getWayName.four;
				}else if (value.equals(getWay.five)){
					result =getWayName.five;
				}
			}else if (name.equals(nameType.status)){
				if (value.equals(status.one)){
					result =statusName.one;
				}else if(value.equals(status.two)){
					result =statusName.two;
				}else if (value.equals(status.three)){
					result =statusName.three;
				}else if(value.equals(status.zero)){
					result =statusName.zero;
				}
			}else if (name.equals(nameType.deviceType)){
				if (value.equals(deviceType.zero)){
					result =deviceName.zero;
				}else if(value.equals(deviceType.one)){
					result =deviceName.one;
				}else if (value.equals(deviceType.two)){
					result =deviceName.two;
				}else if(value.equals(deviceType.three)){
					result =deviceName.three;
				}
			}else if (name.equals(nameType.accountType)){
				if (value.equals(accountType.zero)){
					result =accountTypeName.zero;
				}else if(value.equals(accountType.one)){
					result =accountTypeName.one;
				}else if (value.equals(accountType.two)){
					result =accountTypeName.two;
				}
			}

		}
		return  result;
	}


}
